﻿using STHPMS1.ICore.I_Entity;
using STHPMS1.ICore.I_Entity.Stmpms1;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;

namespace STHPMS1.ICore.I_DAL.Repository
{
    public interface IB_UnitRepository : IDal
    {
        /// <summary>
        /// 根据路段编号查询该路段对应的单元
        /// </summary>
        /// <param name="segId"></param>
        /// <returns></returns>
        List<string> GetUnits(string segId);
        //double GetMinBeginMP(string inspecid, string rdwayid, int d);
        //double GetMaxEndMP(string inspecid, string rdwayid, int d);
        /// <summary>
        /// 根据路线和方向查询指定单元
        /// </summary>
        /// <param name="dir">方向</param>
        /// <param name="rdid">路线编号</param>
        /// <returns></returns>
        List<T> GetUnitList<T>(string dir, string rdid) where T : class,IB_Unit;

        DataTable GetUnitZB(string ldID);

        DataTable GetUnitZBByRdid(string rdid,int dir);

         /// <summary>
        /// 根据养护路段编号返回该路段的平均指标
        /// </summary>
        /// <param name="segId"></param>
        /// <returns></returns>
        DataRow GetUnitAvgZB(string segId);
    }
}
